<%@page import="com.mmy.domain.permissionmenu.TConstRole"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/includeb.jsp"></jsp:include>
<title>角色管理</title>
</head>
<body>
	<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
			<main class="at-padding-large-bottom">
			<article>		
	<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
		<div class="page-header container">
			<h2>系统设置</h2>			
		</div>
	</header>
	<section class="container">
	

			<div>
			
				<form action="permission" class="info-form" type = "post">
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>角色信息管理
						</h4>
				<div >
				<input type="button" class="btn at-float-right" value="对应菜单" onclick="permissionMenu()">	
				<input type="button" value="删除" class="btn at-float-right" onclick="delPermission()">	
				<input type="button" value="修改" class="btn at-float-right" onclick="updatePermission()"> 
				<input type="button" class="btn at-float-right" value="新增" onclick="location.href='createpermission'">	
				角色名称 ：<input type="text" class="input-width" name="strRoleName" value="${strRoleName}"/>
				<input type="submit" value="搜索" class="btn"/>				
				<table class="info-table" >
					<tr>
						<th>
							<input type="checkbox" id="ckall" name="ckall" onclick="ckAll(this);">
						</th>
						<th>角色名称</th>			
						<th>备注</th>
					</tr>
					<c:forEach var="lstConstRole" items="${lstConstRole}">
					<tr>
						<td>
							<input type="checkbox" name="ckone" value="${lstConstRole.getRoleID()}" onclick="ckOne(this)">
						</td>
						<td>${lstConstRole.getRoleName()}</td>
						<td>${lstConstRole.getMemo()}</td>						
					</tr>
				</c:forEach>
				</table>
							<select class="input-select-vlign" name="pageSize"  onchange="permissionPageSize(this.options[this.options.selectedIndex].value)">
								<option style="display: none;" >${iPageSize}</option>
								<option  value="20">20</option>
								<option  value="50">50</option>
								<option  value="100">100</option>
								<option  value="200">200</option>
							</select>
							
							<a href="permission?pageNumber=1&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}">首页</a>
							<c:choose>
			                   <c:when test="${iPageNo == 1}">
			                       
			                   </c:when>
			                   <c:otherwise>
			                         <a href="permission?pageNumber=${iPageNo-1}&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}">上一页</a>
			                   </c:otherwise>
			
							</c:choose>
							<c:choose>
			                   <c:when test="${iPageNo == iMaxPage}">
			                       
			                   </c:when>
			                   <c:otherwise>
			                         <a href="permission?pageNumber=${iPageNo+1}&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}">下一页</a>
			                   </c:otherwise>
			
							</c:choose>
							<a href="permission?pageNumber=${iMaxPage}&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}">尾页</a>
				</div>
				</form>
			</div>
			</section>
			</article>
			</main>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
		</div>
	<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
</body>
</html>